<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" dir="ltr" style="height:100%">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><{t}>ShopEx网上商店系统<{/t}></title>
<link rel="shortcut icon" href="../favicon.gif" type="image/gif" />
<link href="images/png.css" rel="stylesheet" type="text/css"  />
<link href="images/login.css" rel="stylesheet" type="text/css" />
<style>
  body,html {
    height: 100%;
    overflow: hidden;
  }
</style>
</head>
<body>
  <div class="login-bg">
    <div class="shopex-logo`">
        <img src="images/shopex-logo.png" alt="shopex485" class="shopex-logo" />
    </div>
    <div class="center-wrap">
      <div class="login-center">
        <div class="bd-logo">
          <img src="images/online-shop.png" alt="shopex网上商店系统" /><br />
          <{if $authstate}>
            <div class="<{if $authcode=='NCI'}>authorize<{else}>noauthorize<{/if}>">
              <{$authstate}>
              <{if $noauthorize }><{$noauthorize}><{/if}>
            </div>
          <{/if}>
        </div>
      </div>
      <{if $message}>
        <div class="message">
          <{$message}>&nbsp;
        </div>
      <{/if}>
      <div class="z-bd">
        <div class="login-panel" id="loginPanel">
          <h3 class="panel-hd cl-link-blue">网上商店系统登录</h3>
          <form name="form1" action="index.php?ctl=passport&act=dologin" method="post" class="formstyle">
            <{if $return}>
            <input type="hidden" name="return" value="<{$return}>" />
            <{/if}>
            <div class="controls first">
              <img class="ipt-name" src="images/name.png" alt="name" />
              <input id="usrname" type="text" name="usrname" class="inputstyle" maxlength="50" autocomplete="off" value="<{$username|default:'请输入用户名'}>" onfocus="if(this.value=='请输入用户名') this.value='';this.className='inputstylefocus';return true;" onblur="if(this.value=='') this.value='请输入用户名';this.className='inputstyle';return true;">
            </div>
            <div class="controls">
              <img class="ipt-name" src="images/passw.png" alt="passw"/>
              <input id="password" type="password" name="passwd" class="inputstyle" maxlength="20" value="+_-_-_+" onfocus="if(this.value=='+_-_-_+') this.value='';this.className='inputstylefocus';return true;" onblur="if(this.value=='') this.value='+_-_-_+';this.className='inputstyle';return true;">
            </div>
            <div class="controls third" style="position:relative">
            <{if $show_varycode}>
              <img class="ipt-name" src="images/verifycode.png" alt="verifycode"/>
              <input type="text" class="inputstyle" autocomplete="off" size=8 name="verifycode" id="verifycode" value="请输入验证码" onfocus="if(this.value=='请输入验证码') this.value=''; this.className='inputstylefocus';return true;" onblur="if(this.value=='') this.value='请输入验证码'; this.className='inputstyle';return true;">
              <div class="verifycode-img">
                <img src="index.php?ctl=passport&act=verifycode&<{$smarty.now}>" align="top">
              </div>
            <{/if }>
            </div>
            <div>
              <button type="submit" class="loginbtn" onmousedown="this.className='loginbtnfocus';return true;">登录</button>
            </div>
            <div class="auto-login">
              <input type="checkbox" name="save_login_name" checked><label>自动登录</label>
              <a target="_blank" href="#">忘记密码？</a>
            </div>
          </form>
        </div>
        <div class="login-cloud" id="elseLogin">
          <div class="hd">其他登录方式</div>
          <a id="cloudLogin" href="javascript:void(0)" target="_parent" onclick="loginTab();">
          </a>
          <p>云起账号</p>
        </div>
      </div>
      <div class="foot"></div>
    </div>
    <p class="copyright">&copy;&nbsp;&nbsp;2013-2016&nbsp;ShopEx,Inc.All&nbsp;rights&nbsp;reserverd.</p>
  </div>
  <script>
    var dom ="<h3 class='panel-hd cl-orange'>云起登录</h3><div class='main'><span class='error-hint' {if !$error_msg } style='display:none' {/if} id='login_error_msg'>{$error_msg}</span><iframe src='<{$oauth_url}>' width='100%' frameborder='0' height='225px' class='Login-frame' allowtransparency></iframe><div class='cloud-passw'><a target='_blank' href='https://account.shopex.cn/forget?' style='float:left;'>忘记密码？</a> <a href='javascript:void(0)' style='float:right;' onclick='loginTab()'>返回本地登录&gt;&gt;</a> </div> </div>";
    var cloudLogin = document.getElementById('cloudLogin');
    var elsePanel = document.getElementById('elseLogin');
    var loginPanel = document.getElementById('loginPanel');
    var oldLogin  = loginPanel.innerHTML;
    var oldElseTxt = elsePanel.getElementsByTagName('p')[0].innerHTML;

  function loginTab(){
    if(JSON.stringify(elsePanel.classList).indexOf('net')<0){
      loginPanel.classList.add('cloud');
      elsePanel.classList.add('net');
      loginPanel.innerHTML= dom;
      elsePanel.getElementsByTagName('p')[0].innerHTML = '网上商店系统账号';
    }else{
      loginPanel.classList.remove('cloud');
      elsePanel.classList.remove('net');
      loginPanel.innerHTML= oldLogin;
      elsePanel.getElementsByTagName('p')[0].innerHTML = oldElseTxt;
    }
  }
  </script>
</body>
</html>